package com.example.goodpet.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.sql.Date;
import java.util.List;

public class UserPetInfo implements Parcelable {

    private long userId;
    private String phoneNumber;
    private String nickname;
    private String portrait;
    private long gender;
    private String signature;
    private long petId;
    private long category;
    private String overview;
    private String place;
    private String postdate;
    private long type;
    private List<String> petImage;


    public UserPetInfo(){}

    public UserPetInfo(long userId, String phoneNumber, String nickname, String portrait, long gender, String signature, long petId, long category, String overview, String place, String postdate, long type, List<String> petImage) {
        this.userId = userId;
        this.phoneNumber = phoneNumber;
        this.nickname = nickname;
        this.portrait = portrait;
        this.gender = gender;
        this.signature = signature;
        this.petId = petId;
        this.category = category;
        this.overview = overview;
        this.place = place;
        this.postdate = postdate;
        this.type = type;
        this.petImage = petImage;
    }


    protected UserPetInfo(Parcel in) {
        userId = in.readLong();
        phoneNumber = in.readString();
        nickname = in.readString();
        portrait = in.readString();
        gender = in.readLong();
        signature = in.readString();
        petId = in.readLong();
        category = in.readLong();
        overview = in.readString();
        place = in.readString();
        postdate = in.readString();
        type = in.readLong();
        petImage = in.createStringArrayList();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(userId);
        dest.writeString(phoneNumber);
        dest.writeString(nickname);
        dest.writeString(portrait);
        dest.writeLong(gender);
        dest.writeString(signature);
        dest.writeLong(petId);
        dest.writeLong(category);
        dest.writeString(overview);
        dest.writeString(place);
        dest.writeString(postdate);
        dest.writeLong(type);
        dest.writeStringList(petImage);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<UserPetInfo> CREATOR = new Creator<UserPetInfo>() {
        @Override
        public UserPetInfo createFromParcel(Parcel in) {
            return new UserPetInfo(in);
        }

        @Override
        public UserPetInfo[] newArray(int size) {
            return new UserPetInfo[size];
        }
    };

    public List<String> getPetImage() {
        return petImage;
    }

    public void setPetImage(List<String> petImage) {
        this.petImage = petImage;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }


    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }


    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }


    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }


    public long getGender() {
        return gender;
    }

    public void setGender(long gender) {
        this.gender = gender;
    }


    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }


    public long getPetId() {
        return petId;
    }

    public void setPetId(long petId) {
        this.petId = petId;
    }


    public long getCategory() {
        return category;
    }

    public void setCategory(long category) {
        this.category = category;
    }


    public String getOverview() {
        return overview;
    }

    public void setOverview(String overview) {
        this.overview = overview;
    }


    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }


    public String getPostdate() {
        return postdate;
    }

    public void setPostdate(String postdate) {
        this.postdate = postdate;
    }


    public long getType() {
        return type;
    }

    public void setType(long type) {
        this.type = type;
    }


    @Override
    public String toString() {
        return "UserPetInfo{" +
                "userId=" + userId +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", nickname='" + nickname + '\'' +
                ", portrait='" + portrait + '\'' +
                ", gender=" + gender +
                ", signature='" + signature + '\'' +
                ", petId=" + petId +
                ", category=" + category +
                ", overview='" + overview + '\'' +
                ", place='" + place + '\'' +
                ", postdate=" + postdate +
                ", type=" + type +
                ", petImage=" + petImage +
                '}';
    }
}
